package at.htlkaindorf.jee.jasper.jasperreportsexample1;

import java.math.BigDecimal;

/**
 *
 * @author Thomas
 */
public class InvoiceLine {

    private String designation;

    private Integer amount;
    private String unitDesignation;

    private BigDecimal unitPrice;

    public InvoiceLine() {
    }
    
    public InvoiceLine(String designation, Integer amount, String unitDesignation, BigDecimal unitPrice) {
        this.designation = designation;
        this.amount = amount;
        this.unitDesignation = unitDesignation;
        this.unitPrice = unitPrice;
    }

    public BigDecimal getTotalPrice() {
        return unitPrice.multiply(new BigDecimal(amount));
    }

    public String getUnitDesignation() {
        return unitDesignation;
    }

    public void setUnitDesignation(String unitDesignation) {
        this.unitDesignation = unitDesignation;
    }

    public BigDecimal getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(BigDecimal unitPrice) {
        this.unitPrice = unitPrice;
    }

    public Integer getAmount() {
        return amount;
    }

    public String getDesignation() {
        return designation;
    }

    public BigDecimal getPrice() {
        return unitPrice;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public void setDesignation(String designation) {
        this.designation = designation;
    }

    public void setPrice(BigDecimal price) {
        this.unitPrice = price;
    }
}
